#include"client.h"

int get_choose(int * choose)
{
    scanf("%d",choose);
    while(getchar()!='\n')
    {
        *choose=3;
    }
    return 0;
}
int get_stdin(struct login_status* stat,struct client_info* info)
{
    char msg[100];
    fgets(msg,100,stdin);
    if(memcmp(msg,"\n",sizeof(char))==0)
    {
        printf("您输入了换行符，请重新输入\n");
        info->command=ERR;
        return 0;
    }

    int len=strlen(msg);
    msg[len-1]='\0';
    //分割输入
    depart_command(info,msg);
    if(info->command!=ERR)
    {
    joint_stdin(stat,info);
    }
    return 0;
}
